First principles density functional theory (DFT) is used to investigate the electronic structure of \beta-MnO2. From collinear spin polarized calculations we find that DFT+U_Eff predicts a gapless ferromagnet in contrast with experiment which indicates an insulating antiferromagnet. The inclusion of anisotropic Coulomb and exchange interactions in the DFT+U approach, defining U and J explicitly, corrects these errors and leads to an antiferromagnetic ground state with a fundamental gap of 0.8 eV consistent with low temperature experiments. To our knowledge, this work on \beta-MnO2 represents the first demonstration of a case in which the application of fully anisotropic interactions in DFT+U determines the magnetic order and consequent band gap, while the more commonly used effective U approach fails. Such effects are argued to be of importance in many insulating materials. The mechanism leading to an increase in band gap due to anisotropic interactions is highlighted by analytical calculation of DFT+U d-orbital eigenvalues obtained within a Kanamori-type model. Magnetic coupling constants obtained by the fitting of a Heisenberg spin Hamiltonian to the energies of a range of magnetic states assist in rationalizing the finding that anisotropic interactions enhance the stability of the experimentally observed helical antiferromagnetic order. The plane wave PAW method yields poorer results for the exchange couplings than full-potential LAPW calculations. Finally, we compare the DFT+U results with exchange couplings obtained from hybrid functionals. It is argued that anisotropic interactions should be included in DFT+U if the results are to be properly compared with those from hybrid functionals.